package com.maven.springmvc.mapper;


import com.maven.springmvc.model.MessageInfo;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.logging.log4j.message.Message;
import org.springframework.stereotype.Service;

import java.util.List;

@Mapper
public interface MessageMapper {

    @Insert("insert into message_info (`from`,`to`, `message`) values(#{from},#{to},#{message})")
    public boolean insertMessage(MessageInfo message);


    @Select("select * from message_info ")
    public List<MessageInfo> selectMessage();
}
